<?php
/**
 * 商品规格
 * User: ws
 * Date: 2018/8/9
 * Time: 15:45
 */

namespace app\admin\model;
use think\Model;
class SpecGoodsPrice extends Model
{
    function initialize()
    {
        parent::initialize();
    }
    function add($params){
        $result = $this->isUpdate(false)->setAttr('price_id',null)->allowField(true)->save($params);
        if($result){
            return $this->price_id;
        }else{
            return false;
        }
    }


    function edit($params)
    {
        $result = $this->isUpdate(true)->allowField(true)->save($params);
        if($result){
            return true;
        }else{
            return false;
        }
    }
}